<html>
<body>
<?php
	require "configcmd.php";

	$TransactionID = $_GET['TransactionID'];
	$Charge = $_GET['Charge'];
	$Date_Charge = $_GET['Date_Charge'];
	$Description = $_GET['Description'];

	$con = mysql_connect("localhost",$db_user ,$db_pass);

	if (!$con){
		die('Could not connect: ' . mysql_error());
  	}
	
	mysql_select_db($db_name, $con);
		
	$sql_edit = "UPDATE transactions SET Charge ='$Charge' WHERE TransactionID = '$TransactionID' ;" ;
	$sql_edit1 = "UPDATE transactions SET Description ='$Description' WHERE TransactionID = '$TransactionID' ;" ;
	$sql_edit2 = "UPDATE transactions SET Date_Charge ='$Date_Charge' WHERE TransactionID = '$TransactionID' ;" ;
	mysql_query($sql_edit);
	mysql_query($sql_edit1);
	mysql_query($sql_edit2);


	mysql_close($con);
?>
<h1>Transaction successfully updated</h1>
</body>
<br />
<a href="Main.php">Home</a>
<a href="showtransactions.php">View Transactions</a>
</html>
